package com.kk.myapplication.model;

import androidx.databinding.BaseObservable;

import com.kk.myapplication.abs.IMainListener;

/**
 * @author wk
 * @date 2025/6/20 8:51
 * @describe
 */
public class MainModel extends BaseObservable implements IMainListener {

    private IMainListener mListener;

    @Override
    public void onBtnScanDisplay() {
        if (mListener != null) {
            mListener.onBtnScanDisplay();
        }
    }

    @Override
    public void onBtnOpenPresentation() {
        if (mListener != null) {
            mListener.onBtnOpenPresentation();
        }
    }

    @Override
    public void onBtnClosePresentation() {
        if (mListener != null) {
            mListener.onBtnClosePresentation();
        }
    }

    @Override
    public void onBtnOpenMirror() {
        if (mListener != null) {
            mListener.onBtnOpenMirror();
        }
    }

    @Override
    public void onBtnCloseMirror() {
        if (mListener != null) {
            mListener.onBtnCloseMirror();
        }
    }

    public void setListener(IMainListener listener) {
        mListener = listener;
    }
}
